package com.liyl.controller;

import com.liyl.service.ProduceService;
import com.liyl.vo.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

/**
 * @author 80005054
 */

@RestController
@RequestMapping("produce")
public class ProduceController {

    @Autowired
    private ProduceService produceService;

    @GetMapping("download")
    public Result download(HttpServletResponse response) throws IOException {
        produceService.exportExcel(response);
        return Result.ok();
    }
}
